<?php
/**
 * AccessControlledObject.class.php
 *
 * PHP version 5.3
 *
 * @author		Leo Valen <leo@valen.pro>
 */
/**
 * Base class for TeamPlayers objects
 *
 * @version		1.0
 */
namespace TeamPlayers;
abstract class AccessControlledObject extends StoredObject
{
	/**
	 * Returns true if this object allows the specified action by the current user, or another specified user
	 *
	 * @param       string $action
	 * @param       string $user
	 * @return		bool
	 * @access		public
	 */
	public function allows( $action, $user = "" )
	{
	    $class = get_class( $this );
		return TeamPlayers::$ac->can( $action, $class, $this, $user );
	}
}
?>
